<?php
// Copyright 2012 @Wondershare
// $Id: main.php 437152 2012-07-23 13:07:00Z xuwh $


// uncomment the following to define a path alias
// Yii::setPathOfAlias('local','path/to/local-folder');

// This is the main Web application configuration. Any writable
// CWebApplication properties can be configured here.
$backend=APP_PATH;
$frontend=dirname($backend);
Yii::setPathOfAlias('backend',$backend);
Yii::setPathOfAlias('frontend',$frontend);
$frontendArray=require_once($frontend.'/config/main.php');
$backendArray=array(
	'name'=>'MobilePortal Management System',
	'basePath'=>$frontend,
    'viewPath'=>$backend.'/views',
	'controllerPath'=>$backend.'/controllers',
    'runtimePath'=>$backend.'/runtime',
	'import'=>array(	
		'application.models.*',
		'application.components.*',
		'application.extensions.*',
	    'backend.models.*',
		'backend.components.*',
	),
	'components'=>array(
		'urlManager'=>array(
			'urlFormat'=>'path',
			'urlSuffix'=>null,
			'showScriptName'=>true, 
			'rules'=>null,
		),
		
	),
	'language'	=>    'zh_cn',
	'params'=>CMap::mergeArray(require($frontend.'/config/params.php'),require($backend.'/config/params.php')),
);
// echo Yii::getPathOfAlias('backend') ;exit; //   /usr/local/nginx/html/wsmp/Modules/protected/admin
// echo Yii::getPathOfAlias('site') ; exit; //    /usr/local/nginx/html/wsmp/Sites/admin.mobileportal.dev/protected
// echo Yii::getPathOfAlias('application') ;
// echo '<pre>'.print_r(CMap::mergeArray($frontendArray,$backendArray) , true).'</pre>' ; exit ;
// echo '<pre>'.print_r(Yii::app()->aliases , true).'</pre>' ; exit ;
return CMap::mergeArray($frontendArray,$backendArray);